#ifndef COMMUNICATIONWINDOW_H
#define COMMUNICATIONWINDOW_H

#include <QWidget>
#include <QTcpSocket>
#include <QMessageBox>
#include <GlobalUserInformation.h>
#include <QScrollBar>
#include <QDateTime>
#include <QTimer>
#include <QFileDialog>        // 新增
#include <QJsonDocument>      // 新增
#include <QJsonObject>        // 新增
#include <QPushButton>        // 新增
#include <QFileInfo>          // 新增

namespace Ui {
class CommunicationWindow;
}

class CommunicationWindow : public QWidget
{
    Q_OBJECT

public:
    explicit CommunicationWindow(QTcpSocket * clientSocket,QWidget *parent = nullptr);
    ~CommunicationWindow();

private slots:
    void on_DoctorBox_currentIndexChanged();
    void on_BackButton_clicked();
    void on_SendButton_clicked();
    void DialogEdit_update();
    void on_ImageButton_clicked();    // 新增：图片发送槽函数

signals:
    void back();

private:
    Ui::CommunicationWindow *ui;
    QTcpSocket *clientSocket;
    QTimer *timer;
    QPushButton *imageButton;         // 新增：图片按钮
};

#endif // COMMUNICATIONWINDOW_H
